<template>
  <c-back-wrap :loading="loading" go-page="市场开发/升级任务管理" current-page="详情">
    <QupList :column="3" sep="：" default-value="" label-position="right" label-width="130">
      <QupListItem label="市场编码" :value="detail.marketCode" />
      <QupListItem label="市场名称" :value="detail.marketName" />
      <QupListItem label="市场类型" :value="detail.marketType" dict-type-code="TOBE_MARKET_TYPE" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="市场属性" :value="detail.marketNatrue" dict-type-code="MARKET_NATURE" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="是否属于异常报备" :value="detail.isExceptionReporting" dict-type-code="BOOLEANS" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="是否重点市场" :value="detail.isKeyMarket" dict-type-code="BOOLEANS" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="省份" :value="detail.provinceName" />
      <QupListItem label="地市" :value="detail.cityName" />
      <QupListItem label="区县" :value="detail.districtName" />
      <QupListItem label="街道/乡镇" :value="detail.streetName" />
      <QupListItem label="城市级别" :value="detail.cityLevel" dict-type-code="CITY_LEVEL" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="完成招商" :value="detail.isAttractInvestment" dict-type-code="BOOLEANS" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <!-- <QupListItem label="是否缴纳保证金" :value="detail.isPayEarmestMoney" dict-type-code="BOOLEANS" :prop-enum="{domainCode:'marketing',appCode:'slm'}" /> -->
      <!-- <QupListItem v-if="[1,'1'].includes(detail.isPayEarmestMoney)" label="保证金缴纳时间" :value="$trimHMS(detail.payEarmestMoneyTime)" /> -->
      <!-- <QupListItem label="招商经理" :value="detail.managerName" /> -->
      <!-- <QupListItem label="招商经理电话" :value="detail.managerPhone" /> -->
      <QupListItem label="所属办事处" :value="detail.agencyCode" />
      <QupListItem label="办事处名称" :value="detail.agencyName" />
      <QupListItem label="所属客户" :value="detail.customerCode" />
      <QupListItem label="客户名称" :value="detail.customerName" />
      <QupListItem label="门店编码" :value="detail.shopCode" />
      <QupListItem label="门店名称" :value="detail.shopName" />
      <QupListItem label="原商家客户编码" :value="detail.originalCustomerCode" />
      <QupListItem label="原商家客户名称" :value="detail.originalCustomerName" />
      <QupListItem label="门店建设项目号" :value="detail.shopBuildNumber" />
      <QupListItem label="门店建设类型" :value="detail.shopBuildType" dict-type-code="CONST_TYPE" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="门店建设整体进度" :value="detail.shopBuildStage" dict-type-code="BEFORE_CONST_SCHEDULE" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="客户经理编码" :value="detail.responsibleCode" />
      <QupListItem label="客户经理名称" :value="detail.responsibleName" />
      <QupListItem label="客户经理类型" :value="detail.responsibleType" />
      <QupListItem label="客户经理联系电话" :value="detail.responsiblePhone" />
      <QupListItem label="数据来源" :value="detail.dataSource" dict-type-code="CTM_MARKET_DATA_FROM" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="数据来源描述" :value="detail.dataSourceMsg" :span="24" />
      <QupListItem label="登记日期" :value="this.$trimHMS(detail.registerTime)" />
      <QupListItem label="任务类型" :value="detail.taskType" dict-type-code="CTM_MARKET_TASK_TYPE" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="升级改造要求" :value="detail.upgradeRequirement" :span="24" />
      <QupListItem label="最早分配月份" :value="detail.earliestDistributionMonth" />
      <QupListItem label="分配次数" :value="detail.allocationNumber" />
      <QupListItem label="分配状态" :value="detail.allocationStatus" dict-type-code="CTM_ALLOCATE_STYLE" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="市场跟进进度" :value="detail.marketFollowUpStage" dict-type-code="CTM_MARKET_BUID_PROGRESS" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="结案日期" :value="this.$trimHMS(detail.settlementDate)" />
      <QupListItem label="结案方式" :value="detail.settlementMethod" dict-type-code="CTM_CLOSED_TYPE" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="门店建设项目号" :value="detail.shopBuildNumber" />
      <QupListItem label="门店建设整体进度" :value="detail.shopBuildStage" dict-type-code="BEFORE_CONST_SCHEDULE" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="说明" :value="detail.remark" :span="24" />
      <QupListItem label="限期到期日" :value="this.$trimHMS(detail.cutOffTime)" />
      <QupListItem label="考核计划" :value="detail.appraisalPlan" dict-type-code="CTM_APPRAISAL_PLAN" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="取消分配原因" :value="detail.unAllocationReason" :span="24" />
      <QupListItem label="停用原因" :value="detail.discontinuationReason" dict-type-code="CTM_MARKET_DISABLE_TYPE" :prop-enum="{domainCode:'marketing',appCode:'slm'}" />
      <QupListItem label="停用说明" :value="detail.discontinuationRemark" :span="24" />
    </QupList>
    <div class="btn-center">
      <c-button type="primary" @click="handleGoBack">返回</c-button>
    </div>
  </c-back-wrap>
</template>
<script>
import { detailTask } from '@/api/channelTask2/storeUpgradeTask'
export default {
  name: 'Detail',
  props: {
    id: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      detail: {},
      loading: false
    }
  },
  created() {
    this.getDetailData()
  },
  methods: {
    getDetailData() {
      this.loading = true
      return detailTask(this.id).then(res => {
        this.detail = res.data
      }).finally(() => {
        this.loading = false
      })
    },
    handleGoBack() {
      this.$pageStack.pop()
    }
  }
}
</script>
